home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
pluginy Firefox
/
3895
/
3895.xpi
/
chrome
/
compact-ce.jar
/
content
/
toolbar.js
< prev
next >
Wrap
Text File
|
2007-12-22
|
921b
|
29 lines
var toolbar = {
item: null,
x: document.getElementById("icons"),
y: document.getElementById("adv"),
z: document.getElementById("modelist"),
load: function() {
this.item = document.defaultView.arguments[0];
var item = this.item;
if (item.getAttribute("iconsize") == "small") this.x.selectedIndex = 1;
if (item.getAttribute("adv") == "true") this.y.checked = true;
var mode = item.getAttribute("mode");
var z = this.z;
if (mode== "icons") z.selectedIndex = 1;
else if (mode== "text") {
z.selectedIndex = 2;
this.x.disabled = true;
this.x.previousSibling.disabled = true;
} else z.selectedIndex = 0;
},
save: function() {
var item = this.item;
item.setAttribute("iconsize", this.x.selectedItem.value);
item.setAttribute("adv", this.y.hasAttribute("checked"));
item.setAttribute("mode", this.z.selectedItem.value);
}
}